<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .outter-div{
            border: 1px solid red;
            position: relative;
            width: 100%;
            
        }

        .outter-div textarea{
            border: 1px solid green;
            position: absolute;
            height: 100%;
            width: 100%;
            line-height: 16px;
        }
        .inner-div{
            position: relative;
            min-height: 16px;
            white-space: pre-wrap;
            line-height: 16px;
            visibility: hidden;
        }
    </style>
</head>
<body>
    <div id="app" class="outter-div">
        <textarea v-model="text"></textarea>
        <div class="inner-div">
            {{ text }}
        </div>
    </div>
    <script src="https://unpkg.com/vue@next"></script>
    <script>

        const app =  Vue.createApp({
            props: {},
            setup(){
                let text = Vue.ref('')
                return {
                    text
                }
            }
        })
        app.mount("#app")
    </script>
</body>
</html>